home *** CD-ROM | disk | FTP | other *** search
- /* CTreeViewer.h */
-
- #pragma once
-
- #include <CDirector.h>
-
- // Forward references
- class CBureaucrat;
- class CDirectorOwner;
- class CDesktop;
- class CPicture;
- class CScrollPane;
- class CView;
-
- class CTreeViewer : public CDirector
- {
-
- public:
- CPicture *itsPicture;
- CScrollPane *itsScrollPane;
-
- void ITreeViewer (short WINDid, Boolean floating, CDesktop *anEnclosure,
- CDirectorOwner *aSupervisor);
- virtual void ShowSubviews (CView *theView);
- virtual void ShowEnclosures (CView *theView);
- virtual void ShowSupervisors (CBureaucrat *theBureaucrat);
- virtual void DoCommand(long theCommand);
- virtual void UpdateMenus(void);
-
- protected:
- virtual void GetSizeSV (CView *theView, short *width, short *depth_p,
- short thisDepth);
- virtual void DrawTreeSV (CView *theView, short h, short v, short myWidth,
- Boolean first);
- virtual void GetSizeE (CView *theView, short *height_p);
- virtual void DrawHierE (CView *theView, short h, short v, Boolean first);
- virtual void GetSizeS (CBureaucrat *theBureaucrat, short *height_p);
- virtual void DrawHierS (CBureaucrat *theBureaucrat, short h, short v, Boolean first);
- virtual void InstallPicture (PicHandle thePict, short hSize, short vSize);
- virtual Boolean LongToStr (long ID, Str63 theType);
- };
-
- // Width and height parameters for constructing the visual tree. Since the tree is drawn
- // sideways, CellWidth is a vertical measurement and CellDepth is horizontal.
-
- #define kSVCellWidth 20
- #define kSVCellDepth 120
- #define kSVBoxWidth 112
- #define kSVBoxHeight 16
-
- // Width and height parameters for showing the enclosures and the supervisors.
-
- #define kECellHeight 20
- #define kECellWidth 120
- #define kEBoxHeight 16
- #define kEBoxWidth 112
-
- #define MAX(a,b) (a)>(b) ? (a) : (b)